export function isHidden(element) {
    var style = window.getComputedStyle(element);
    var isHidden = style.display === 'none'; // offsetParent returns null in the following situations:
    // 1. The element or its parent element has the display property set to none.
    // 2. The element has the position property set to fixed

    var isParentHidden = element.offsetParent === null && style.position !== 'fixed';
    return isHidden || isParentHidden;
}